#include "dominion.h"
#include "dominion_helpers.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void zzzsmithycardplay(int i, int currentPlayer, int handPos,
		struct gameState* state);

void test()
{
	struct gameState g;
	struct gameState * game = &g;
	memset(game, 0, sizeof(struct gameState));
	int currentPlayer;
	int handCount;
	
	int k[10] = {adventurer, gardens, embargo, village, minion, mine, cutpurse, 
		sea_hag, tribute, smithy};
	initializeGame(4, k, 2, game);
	
	currentPlayer = 0;
	handCount = game->handCount[currentPlayer];
	zzzsmithycardplay(0, currentPlayer, 0, game);
	
	if (game->handCount[currentPlayer] == handCount + 2)
		printf("zzzsmithycardplay(): PASS when test drawing 3 cards for player %d\n", currentPlayer);
	else
		printf("zzzsmithycardplay(): FAIL when test drawing 3 cards for player %d\n", currentPlayer);
		
	currentPlayer = 3;
	handCount = game->handCount[currentPlayer];
	zzzsmithycardplay(0, currentPlayer, 0, game);
	
	if (game->handCount[currentPlayer] == handCount + 2)
		printf("zzzsmithycardplay(): PASS when test drawing 3 cards for player %d\n", currentPlayer);
	else
		printf("zzzsmithycardplay(): FAIL when test drawing 3 cards for player %d\n", currentPlayer);
}

int main(int argc, char *argv[])
{
	test();
	return 0;
}
